﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Agro.Models;
using System.Data;
using SN.Core;
using SN.Data;

namespace Agro.Services
{
    public interface IOrganizationService : IBaseService
    {
        /// <summary>
        /// 保存组织机构
        /// </summary>
        /// <param name="model"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        bool SaveOrganization(T_Organization model, out string msg);
        /// <summary>
        /// 删除组织机构
        /// </summary>
        /// <param name="id"></param>
        /// <param name="pid"></param>
        /// <param name="childNum"></param>
        /// <returns></returns>
        int DeleteOrganization(string id, string pid, int childNum);
        /// <summary>
        /// 获取组强机构列表
        /// </summary>
        /// <param name="query"></param>
        /// <param name="wclip"></param>
        /// <returns></returns>
        DataTable GetOrganizationList(QueryBase query, WhereClip wclip);
        /// <summary>
        /// 根据type获得org的个数
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        int GetCountOrgByType(int orgid,string type);
        //管理部门上报统计结果
        DataTable GetCXJG(int orgid);
        //企业上报统计结果
        DataTable GetQYCXJG(int orgid);
        IList<T_Organization> GetCacheOrganizeList();
    }
}
